package com.ygqh.baby.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.model.YgProduct4ListModel;
import com.ygqh.baby.model.YgProductPackModel;
import com.ygqh.baby.po.YgProduct;
import com.ygqh.baby.po.YgProductPack;
import com.ygqh.baby.po.YgProductPackExample;

public interface YgProductPackMapper {
	int countByExample(YgProductPackExample example);

	int deleteByExample(YgProductPackExample example);

	int deleteByPrimaryKey(Long id);

	int insert(YgProductPack record);

	int insertSelective(YgProductPack record);

	List<YgProductPack> selectByExample(YgProductPackExample example);

	YgProductPack selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") YgProductPack record, @Param("example") YgProductPackExample example);

	int updateByExample(@Param("record") YgProductPack record, @Param("example") YgProductPackExample example);

	int updateByPrimaryKeySelective(YgProductPack record);

	int updateByPrimaryKey(YgProductPack record);

	int countSuper(@Param("supplierId") Long supplierId, @Param("pStatus") String pStatus, @Param("startDate") Date startDate, @Param("endDate") Date endDate,
			@Param("q") String q);

	List<YgProductPack> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("supplierId") Long supplierId, @Param("pStatus") String pStatus,
			@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("q") String q);

	List<YgProduct4ListModel> selectProductByPackId(@Param("queryInfo") QueryInfo queryInfo, @Param("packId") Long packId);

	List<YgProduct> selectProductListToPack(@Param("queryInfo") QueryInfo queryInfo, @Param("productName") String productName, @Param("groupId") Long groupId,
			@Param("productStatus") String productStatus, @Param("supplierId") Long supplierId, @Param("packId") Long packId);

	List<YgProductPackModel> selectOwnProductPackList(@Param("productId") Long productId);

	List<YgProductPack> selectProductPackList();

	List<YgProduct> selectProductName(@Param("productIds") String productIds);

	List<YgProductPack> selectNotCompleteAction(@Param("packId") Long packId, @Param("startDate") Date startDate);

	YgProductPack selectPackByProductId(@Param("productId") Long productId);

	List<YgProduct> selectProductByPack(@Param("packId") Long packId);
	
	int selectProductCount(@Param("packId") Long packId);

}
